/*
 * @Author: wuhao930406 1148547900@qq.com
 * @Date: 2023-08-31 14:54:36
 * @LastEditors: wuhao930406 1148547900@qq.com
 * @LastEditTime: 2023-09-12 14:14:17
 * @FilePath: /utools_web/src/pages/User/Login/index.jsx
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
import Footer from '@/components/Footer';
import Logo3D from '@/components/Logo3D';
import { theme} from 'antd';
import { useState } from 'react';
import { useOutletContext,useModel } from '@umijs/max';
import Loginpage from './loginpage';
import { useAsyncEffect } from 'ahooks';


export default function App() {
  const { mode } = useOutletContext();
  const {
    token: { colorText },
  } = theme.useToken();

  const [isin, setIsin] = useState(false);
  const [isover, setIsover] = useState(false);

  useAsyncEffect(async () => {
    setIsin(true);
    
  }, []);

  return (
    <div style={{ width: '100vw', height: '100vh', overflow: 'hidden' }}>
      <Logo3D
        theme={mode}
        isin={isin}
        isover={isover}
        setIsover={setIsover}
        style={{ position: 'absolute', left: 0, width: '100%', height: '100%' }}
      ></Logo3D>
      <Loginpage isin={isin} setIsin={setIsin} mode={mode}></Loginpage>
      <Footer
        style={{
          position: 'fixed',
          bottom: 0,
          zIndex: 99999,
          left: 0,
          right: 0,
          margin: 'auto',
          color: colorText,
        }}
      />
    </div>
  );
}
